package com.hntest.entity;

import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/*
* 借款
*
* */

public class BidRequest implements Serializable {

    private static final long serialVersionUID = 7185723880688843507L;

    private int bidrequestid;
    private int returntype =BidConst.RETURN_TYPE_MONTH_INTEREST_PRINCIPAL;
    private int bidrequesttype = BidConst.BIDREQUEST_TYPE_NORMAL;
    private int bidrequeststate = BidConst.BIDREQUEST_STATE_PUBLISH_PENDING;

    private BigDecimal bidrequestamount = BidConst.ZERO;  //借款金额
    private BigDecimal currentrate = BidConst.ZERO;   //借款利率
    private BigDecimal minbidamount = BidConst.SMALLEST_BID_AMOUNT;  //最小投标
    private int monthes2return = 1;  //借款限期
    private int bidcount = 0;   //已经有的投标数
    private BigDecimal totalrewardamount=BidConst.ZERO; //总报酬金额
    private BigDecimal currentsum = BidConst.ZERO; //现在借到多少钱
    private String title = "";  //借款辩题
    private String descriptions = ""; //借款描述
    private String note=""; //风控意见
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date disabledate = new Date(); //招标到期时间
    private int disabledays = 0; //标的有效天数
    private Logininfo createuser_id; // 借款人信息
    private List<Bid> bids = new ArrayList<Bid>();//债主投资表
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date applytime; //申请时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date publishtime; //发布时间
    private Bid bid;//assiociation


    public BidRequest() { }

    public BidRequest(int bidrequestid, int returntype, int bidrequesttype, int bidrequeststate, BigDecimal bidrequestamount, BigDecimal currentrate, BigDecimal minbidamount, int monthes2return, int bidcount, BigDecimal totalrewardamount, BigDecimal currentsum, String title, String descriptions, String note, Date disabledate, int disabledays, Logininfo createuser_id, List<Bid> bids, Date applytime, Date publishtime, Bid bid) {
        this.bidrequestid = bidrequestid;
        this.returntype = returntype;
        this.bidrequesttype = bidrequesttype;
        this.bidrequeststate = bidrequeststate;
        this.bidrequestamount = bidrequestamount;
        this.currentrate = currentrate;
        this.minbidamount = minbidamount;
        this.monthes2return = monthes2return;
        this.bidcount = bidcount;
        this.totalrewardamount = totalrewardamount;
        this.currentsum = currentsum;
        this.title = title;
        this.descriptions = descriptions;
        this.note = note;
        this.disabledate = disabledate;
        this.disabledays = disabledays;
        this.createuser_id = createuser_id;
        this.bids = bids;
        this.applytime = applytime;
        this.publishtime = publishtime;
        this.bid = bid;
    }

    @Override
    public String toString() {
        return "BidRequest{" +
                "bidrequestid=" + bidrequestid +
                ", returntype=" + returntype +
                ", bidrequesttype=" + bidrequesttype +
                ", bidrequeststate=" + bidrequeststate +
                ", bidrequestamount=" + bidrequestamount +
                ", currentrate=" + currentrate +
                ", minbidamount=" + minbidamount +
                ", monthes2return=" + monthes2return +
                ", bidcount=" + bidcount +
                ", totalrewardamount=" + totalrewardamount +
                ", currentsum=" + currentsum +
                ", title='" + title + '\'' +
                ", descriptions='" + descriptions + '\'' +
                ", note='" + note + '\'' +
                ", disabledate=" + disabledate +
                ", disabledays=" + disabledays +
                ", createuser_id=" + createuser_id +
                ", bids=" + bids +
                ", applytime=" + applytime +
                ", publishtime=" + publishtime +
                ", bid=" + bid +
                '}';
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public int getBidrequestid() {
        return bidrequestid;
    }

    public void setBidrequestid(int bidrequestid) {
        this.bidrequestid = bidrequestid;
    }

    public int getReturntype() {
        return returntype;
    }

    public void setReturntype(int returntype) {
        this.returntype = returntype;
    }

    public int getBidrequesttype() {
        return bidrequesttype;
    }

    public void setBidrequesttype(int bidrequesttype) {
        this.bidrequesttype = bidrequesttype;
    }

    public int getBidrequeststate() {
        return bidrequeststate;
    }

    public void setBidrequeststate(int bidrequeststate) {
        this.bidrequeststate = bidrequeststate;
    }

    public BigDecimal getBidrequestamount() {
        return bidrequestamount;
    }

    public void setBidrequestamount(BigDecimal bidrequestamount) {
        this.bidrequestamount = bidrequestamount;
    }

    public BigDecimal getCurrentrate() {
        return currentrate;
    }

    public void setCurrentrate(BigDecimal currentrate) {
        this.currentrate = currentrate;
    }

    public BigDecimal getMinbidamount() {
        return minbidamount;
    }

    public void setMinbidamount(BigDecimal minbidamount) {
        this.minbidamount = minbidamount;
    }

    public int getMonthes2return() {
        return monthes2return;
    }

    public void setMonthes2return(int monthes2return) {
        this.monthes2return = monthes2return;
    }

    public int getBidcount() {
        return bidcount;
    }

    public void setBidcount(int bidcount) {
        this.bidcount = bidcount;
    }

    public BigDecimal getTotalrewardamount() {
        return totalrewardamount;
    }

    public void setTotalrewardamount(BigDecimal totalrewardamount) {
        this.totalrewardamount = totalrewardamount;
    }

    public BigDecimal getCurrentsum() {
        return currentsum;
    }

    public void setCurrentsum(BigDecimal currentsum) {
        this.currentsum = currentsum;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescriptions() {
        return descriptions;
    }

    public void setDescriptions(String descriptions) {
        this.descriptions = descriptions;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public Date getDisabledate() {
        return disabledate;
    }

    public void setDisabledate(Date disabledate) {
        this.disabledate = disabledate;
    }

    public int getDisabledays() {
        return disabledays;
    }

    public void setDisabledays(int disabledays) {
        this.disabledays = disabledays;
    }

    public Logininfo getCreateuser_id() {
        return createuser_id;
    }

    public void setCreateuser_id(Logininfo createuser_id) {
        this.createuser_id = createuser_id;
    }

    public List<Bid> getBids() {
        return bids;
    }

    public void setBids(List<Bid> bids) {
        this.bids = bids;
    }

    public Date getApplytime() {
        return applytime;
    }

    public void setApplytime(Date applytime) {
        this.applytime = applytime;
    }

    public Date getPublishtime() {
        return publishtime;
    }

    public void setPublishtime(Date publishtime) {
        this.publishtime = publishtime;
    }

    public Bid getBid() {
        return bid;
    }

    public void setBid(Bid bid) {
        this.bid = bid;
    }
}

